<@pp.dropOutputFile />
<#list project.entities as entity>
<@pp.changeOutputFile name="/webapp/WEB-INF/pages/" + entity.className?lower_case + "List.jsp" />
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<html>
<head>
	<%@ include file="/commons/meta.jsp" %>
	<link href="${r"${ctx}"}/widgets/extremecomponents/extremecomponents.css" type="text/css" rel="stylesheet">
	<title>${entity.className} Manage</title>
</head>

<body id="towColLayout">

	<div id="container" class="clearfix">
		<div id="header" class="clearfix">
			<div  class="clearfix">
				<img id="logo" src="style/images/logo.jpg" width="268" height="63" alt="SpringSide" />
				<h1>CodeGen Sample</h1>
			</div>
			<ul id="mainNav">
				<#list project.entities as entity>
				<li><a href="${entity.className?lower_case}.do">${entity.className}</a></li>
				</#list>
			</ul>
		<!--End Header-->
		</div>

		<div id="sideContent">
			<div class="shell">
				<div id="navBox" class="cbSide">
					<h3>管理对象</h3>
					<ul id="sideNav">
						<#list project.entities as entity>
						<li><a href="${entity.className?lower_case}.do">Click Here Managerment ${entity.className}</a></li>
						</#list>
					</ul>
				<!--End Box-->
				</div>
			<!--End Shell-->
			</div>
		<!--End SideContent-->
		</div>
	
		<div id="content">
			<div class="shell">
				<h1>${entity.className} List</h1>
				<%@ include file="/commons/messages.jsp" %>
				<ec:table items="${entity.className?lower_case}s" var="${entity.className?lower_case}"
						  action="${r"${ctx}"}/${entity.className?lower_case}.do">
					<ec:exportXls fileName="${entity.className}List.xls" tooltip="Export Excel"/>
					<ec:row>
						<ec:column property="rowcount" cell="rowCount" sortable="false" title="No." width="60"/>
					<#list entity.fields! as f>
						<ec:column property="${f.name?lower_case}" title="${f.name?upper_case}" <#if f.type == "Date"> cell="date" </#if>width="100"/>
					</#list>
				<!--<ec:column property="id" title="ID" width="60"/>
						<ec:column property="name" title="Name" width="120"/>
						<ec:column property="addtime" title="Add Time" cell="date" width="100"/>
						<ec:column property="descn" title="Description" width="300"/>-->
						<ec:column property="null" title="Edit" width="40" sortable="false" viewsAllowed="html">
							<a href="${entity.className?lower_case}.do?method=edit&id=${r"${"}${entity.className?lower_case}.id}">Edit</a>
						</ec:column>
						<ec:column property="null" title="Remove" width="40" sortable="false" viewsAllowed="html">
							<a href="${entity.className?lower_case}.do?method=delete&id=${r"${"}${entity.className?lower_case}.id}">Delete</a>
						</ec:column>
					</ec:row>
				</ec:table>
				<div>
					<button id="addbtn" onclick="location.href='${entity.className?lower_case}.do?method=create'">Add</button>
				</div>
			</div>
		<!--End Content-->
		</div>
	<!--End Container-->
	</div>
<%@ include file="/commons/footer.jsp" %>
</body>
</html>
</#list>